<template>
 <el-form :inline="true" :model="formInline" class="demo-form-inline">
    <el-form-item label="商品分类">
      <el-select
        @change="serchType"
      >
        <el-option 
       
        />
      </el-select>
    </el-form-item>

    <el-form-item label="商品搜索">
      <el-input v-model="formInline.user" placeholder="请输入商品名称/关键字/ID" clearable />
    </el-form-item>

    <el-form-item>
      <el-button type="primary" @click="onSubmit">查询</el-button>
    </el-form-item>
  </el-form>
</template>

<script setup lang="ts">
import { reactive,ref } from 'vue'
const formInline = reactive({
  user: '',
  region: '',
  date: '',
})

const onSubmit = () => {
  console.log('submit!')
}
// 接受父组件数据

// const { data = []} = defineProps<{
//     data: any[],
// }>();
// 按类型搜索
const serchType=()=>{
  console.log("hhhh");
}
type Option = {
  id: number
  label: string
  desc: string
}
const value = ref<Option>()
</script>

<style scoped>
.demo-form-inline .el-input {
  --el-input-width: 220px;
}

.demo-form-inline .el-select {
  --el-select-width: 220px;
}
</style>